home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 43 / Amiga Format CD43 (1999)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1999-09].iso / -serious- / programming / other / pmanager / install < prev    next >
Text File  |  1999-06-14  |  6KB  |  232 lines

  1. ; Installer script for PManager.
  2.  
  3. (user 1)
  4. (set @default-dest "Work:")
  5. (welcome "\nThis installer script will install PManager v2.91 (25 May 1999)\nthe programmer's project manager")
  6.  
  7. (if
  8.     (not (= (exists "MUI:" (noreq)) 2))
  9.     (abort "PManager needs MUI 3.7 or higher.\n")
  10. )
  11. (
  12.     (set a_compiler
  13.         (askchoice
  14.             (prompt "Select C compiler environment to install")
  15.             (choices "SAS/C" "Other")
  16.            (help "Currently fully supported only SAS/C")
  17.             (default 0)
  18.         )
  19.     )
  20.     (if (= a_compiler 0)
  21.     (
  22.     (set a_editor
  23.         (askchoice
  24.             (prompt "Select editor environment to install")
  25.             (choices "GoldED" "SAS/C SE" "Other")
  26.            (help "Currently fully supported only GoldED 4.xx and SAS/C SE editors")
  27.             (default 0)
  28.         )
  29.     )
  30.     )
  31.     )
  32.  
  33.     (set #ddir
  34.     (askdir
  35.         (prompt "Select destination directory to install (directory called \"PManager\" will be created there).\n Or select PManager parent directory to update old version.")
  36.         (help @askdir-help)
  37.         (default @default-dest)
  38.     )
  39.     )
  40.     (set @default-dest (tackon #ddir "PManager"))
  41.  
  42.     (copylib
  43.     (prompt "Installing the WBStart.library")
  44.     (help "")
  45.     (source "config/libs/wbstart.library")
  46.     (dest "Libs:")
  47.     (confirm)
  48.     )
  49.  
  50.     (makedir @default-dest)
  51.     (copyfiles
  52.     (source "/PManager_Install.info")
  53.     (dest #ddir)
  54.     (newname "PManager.info")
  55.     )
  56.     (makedir @default-dest)
  57.     (copyfiles
  58.     (source "docs.info")
  59.     (dest  @default-dest)
  60.     )
  61.     (copyfiles
  62.     (source "config/")
  63.     (choices "PManager.info" "PManager")
  64.     (dest @default-dest)
  65.     )
  66.  
  67.     (makedir (tackon @default-dest "docs"))
  68.     (run ("delete %s/sc all force" @default-dest))
  69.     (run ("delete %s/sc.info all force" @default-dest))
  70.     (run ("delete %s/arexx all force" @default-dest))
  71.     (run ("delete %s/arexx.info all force" @default-dest))
  72.  
  73.     (copyfiles
  74.     (source "")
  75.     (choices "docs/PManager.guide" "docs/PManager.guide.info"
  76.          "docs/PManager.readme" "docs/PManager.readme.info")
  77.     (dest (tackon @default-dest "docs"))
  78.     (prompt "Installing documentation")
  79.     (help "")
  80.     (confirm)
  81.     )
  82.     (if (= (exists ("%s/PManager.sections" @default-dest)) 0)
  83.     (
  84.     (copyfiles
  85.         (source "config/PManager.sections")
  86.         (dest @default-dest)
  87.     )
  88.     )
  89.     )
  90.  
  91. ;----------------------------------------------------------
  92.  
  93.     (if (= a_compiler 0)
  94.     (
  95.     (copyfiles
  96.         (source "config/compiler/sc")
  97.         (choices "grep_gui" "makegst")
  98.         (dest "sc:c/")
  99.         (prompt "Installing GREP_GUI and MAKEGST")
  100.         (help "")
  101.         (confirm)
  102.     )
  103.  
  104.     (if (= (exists ("%s/PManager.tools" @default-dest)) 1)
  105.     (
  106.         (if
  107.         (askbool
  108.             (prompt "Would you like to install default \"PManager.tools\" v2.9?\n (Your edition will be saved with .bak extension)\n\n New in version 2.9:\n\n\"Touch  setdate \"%f\"\"")
  109.             (help "In the new \"PManager.tools\" v2.9 there is a new option \"Touch\"")
  110.             (default 1)
  111.         )
  112.  
  113.         (
  114.             (copyfiles
  115.             (source ("%s/PManager.tools" @default-dest))
  116.             (dest @default-dest)
  117.             (newname "PManager.tools.bak")
  118.             (optional "nofail")
  119.             )
  120.             (copyfiles
  121.             (source "config/compiler/sc/PManager.tools")
  122.             (dest @default-dest)
  123.             )
  124.         )
  125.         )
  126.     )
  127.     (copyfiles
  128.         (source "config/compiler/sc/PManager.tools")
  129.         (dest @default-dest)
  130.     )
  131.     )
  132.  
  133.     (if (= (exists ("%s/PManager.config" @default-dest)) 1)
  134.     (
  135.         (if
  136.         (askbool
  137.             (prompt "Would you like to install default \"PManager.config\" v2.9?\n (Your edition will be saved with .bak extension)")
  138.             (help "In the new \"PManager.config\" v2.9 there is a fixed \"edit\" option for SAS/C SE editor")
  139.             (default 1)
  140.         )
  141.         (
  142.             (copyfiles
  143.             (source ("%s/PManager.config" @default-dest))
  144.             (dest @default-dest)
  145.             (newname "PManager.config.bak")
  146.             (optional "nofail")
  147.             )
  148.             (if (= a_editor 0)
  149.             (
  150.             (run ("join config/editor/golded/PManager.config config/compiler/sc/PManager.config to %s/PManager.config"
  151.                    @default-dest))
  152.             (copyfiles
  153.                 (source "config/editor/golded/scmsg")
  154.                 (dest "ENVARC:sc/")
  155.             )
  156.             )
  157.             )
  158.             (if (= a_editor 1)
  159.             (
  160.             (run ("join config/editor/golded/PManager.config config/compiler/sc/PManager.config to %s/PManager.config"
  161.                    @default-dest))
  162.             (copyfiles
  163.                 (source "config/editor/se/scmsg")
  164.                 (dest "ENVARC:sc/")
  165.             )
  166.             )
  167.             )
  168.             (if (= a_editor 2)
  169.             (
  170.                 (run ("join config/editor/golded/PManager.config config/compiler/sc/PManager.config to %s/PManager.config"
  171.                    @default-dest))
  172.             )
  173.             )
  174.         )
  175.         )
  176.     )
  177.     (
  178.     (if (= a_editor 0)
  179.     (
  180.         (run ("join config/editor/golded/PManager.config config/compiler/sc/PManager.config to %s/PManager.config"
  181.            @default-dest))
  182.         (copyfiles
  183.         (source "config/editor/golded/scmsg")
  184.         (dest "ENVARC:sc/")
  185.         )
  186.     )
  187.     )
  188.     (if (= a_editor 1)
  189.     (
  190.         (run ("join config/editor/golded/PManager.config config/compiler/sc/PManager.config to %s/PManager.config"
  191.            @default-dest))
  192.         (copyfiles
  193.         (source "config/editor/se/scmsg")
  194.         (dest "ENVARC:sc/")
  195.         )
  196.     )
  197.     )
  198.     (if (= a_editor 2)
  199.     (
  200.         (run ("join config/editor/golded/PManager.config config/compiler/sc/PManager.config to %s/PManager.config"
  201.                @default-dest))
  202.     )
  203.     )
  204.     )
  205.  
  206.     )
  207.     )
  208.     )
  209.  
  210.     (if (= a_compiler 1)
  211.     (
  212.         (if (= (exists ("%s/PManager.config" @default-dest)) 0)
  213.         (
  214.         (run ("join config/editor/other/PManager.config config/compiler/other/PManager.config to %s/PManager.config"
  215.                @default-dest))
  216.         (run ("ed %s/PManager.config" @default-dest))
  217.         )
  218.         )
  219.         (if (= (exists ("%s/PManager.tools" @default-dest)) 0)
  220.         (
  221.         (copyfiles
  222.             (source "config/compiler/other/PManager.tools")
  223.             (dest @default-dest)
  224.         )
  225.         )
  226.         )
  227.     )
  228.     )
  229.  
  230.     (exit)
  231. )
  232.